package com.dule.Medic.beans;

import java.io.Serializable;

import com.dule.Medic.model.MedEntry;
import com.dule.Medic.model.Prescription;
import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.tapestry5.beaneditor.NonVisual;

@SuppressWarnings("serial")
@Entity
@Table(name="prescription")
public class PrescriptionBean implements Prescription,Serializable
{
	@Id
	@GeneratedValue
	@NonVisual
	private Long id;
	@Basic
	private String medicine;
	@Basic
	private String instructions;
	@ManyToOne(targetEntity=MedEntryBean.class) 
	private MedEntry medEntry;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getMedicine() {
		return medicine;
	}
	public void setMedicine(String medicine) {
		this.medicine = medicine;
	}
	public String getInstructions() {
		return instructions;
	}
	public void setInstructions(String instructions) {
		this.instructions = instructions;
	}
	public MedEntry getMedEntry() {
		return medEntry;
	}
	public void setMedEntry(MedEntry medEntry) {
		this.medEntry = medEntry;
	}
	public PrescriptionBean() {
		// TODO Auto-generated constructor stub
	}
	
}
